﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Sharp.Domain.PlatformBoundedContext.PersonModule.Aggregates;
using Sharp.Domain.Model;
using Sharp.Infrastructure;

namespace Sharp.Domain.PlatformBoundedContext.OrgModule.Aggregates
{
    /// <summary>
    /// 业务组织结构
    /// </summary>
    public partial class OrgForBusiness : AggregateRoot, IStandardEntity, IStandardState
    {
        /// <summary>
        /// 业务组织结构
        /// </summary>
        public OrgForBusiness()
        {
            ParentOrgForBusinesses = new List<OrgForBusiness>();
            People = new List<Person>();
            OrgForBusinessList = new List<OrgForBusinessList>();
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 引用
        /// </summary>
        public System.Guid? ParentId { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public System.DateTime? CheckInTime { get; set; }
        /// <summary>
        /// 录入员的id
        /// </summary>
        public System.Guid? CheckInUserId { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public System.DateTime? ModifiTime { get; set; }
        /// <summary>
        /// 修改数据的用户Id
        /// </summary>
        public System.Guid? ModifiedUserId { get; set; }
        /// <summary>
        /// 上级组织机构
        /// </summary>
        public virtual OrgForBusiness ParentOrgForBusiness { get; set; }
        /// <summary>
        /// Gets or sets the parent org for businesses.
        /// </summary>
        public virtual ICollection<OrgForBusiness> ParentOrgForBusinesses { get; set; }
        /// <summary>
        /// 业务组织结构下的员工
        /// </summary>
        public virtual ICollection<Person> People { get; set; }

        /// <summary>
        /// 业务组织结构下的组织
        /// </summary>
        public virtual ICollection<OrgForBusinessList> OrgForBusinessList { get; set; }


        public EntityStateOperate EntityState
        {
            get; set; }
    }
}